{extend name="public/base" /}
{block name="title"}角色管理{/block}

{block name="main"}
    
<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form" method="get" action="">
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" name="keyword" value="{$keyword}" class="layui-input searchVal" placeholder="请输入角色名称查询" />
            </div>
            <button class="layui-btn" lay-submit="" >搜索</button>
        </div>
        <div class="layui-inline">
            <a href="/sys/role/add" class="layui-btn layui-btn-normal">添加角色</a>
        </div>
    </form>
</blockquote>


<table class="layui-table">
    <thead>
        <tr>
          <th>ID</th>
          <th>平台</th>
          <th>角色</th>
          <th>备注</th>
          <th>操作</th>
        </tr>
    </thead>
    <tbody>
    {if condition="$data['msg']"}
        <tr class="td_center"><td colspan="4">{$data['msg']}</td></tr>
    {/if}
    {volist name="data['list']" id="item"}
    <tr class="nodelist depth01">
        <td class="td_left">
            <div class="layui-table-cell ">{$item['id']}</div>
        </td>
        <td class="td_left">
            <div class="layui-table-cell ">{$platlist[$item['plat']]}</div>
        </td>
        <td class="td_left">
            <div class="layui-table-cell ">{$item['role']}</div>
        </td>
        <td class="td_left">
            <div class="layui-table-cell ">{$item['remark']}</div>
        </td>
        <td class="td_center">
            <a href="/sys/role/edit/id/{$item['id']}" class="editNode layui-btn layui-btn-xs">编辑</a>
            {if condition="$item['id'] neq 1"}
            <a href="/sys/role/power/id/{$item['id']}" class="editNode layui-btn  layui-btn-danger layui-btn-xs">授权</a>&nbsp;&nbsp;
            {/if}            
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{$showpage|raw}

{/block}